package com.cc.cbdb.fragment;


import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.cc.cbdb.R;
import com.cc.cbdb.activity.X5WebViewActivity;
import com.cc.cbdb.common.constants.Constant;

/**
 * A simple {@link Fragment} subclass.
 */
public class AboutFragment extends Fragment {


    public AboutFragment() {
        // Required empty public constructor
    }


    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        View view = inflater.inflate(R.layout.fragment_about, container, false);
        view.findViewById(R.id.rl_index).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent1 = new Intent(getActivity(), X5WebViewActivity.class);
                intent1.putExtra("title","CBDB官网");
                intent1.putExtra("url", Constant.CBDBINDEX);
                startActivity(intent1);
            }
        });

        view.findViewById(R.id.rl_option).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent1 = new Intent(getActivity(), X5WebViewActivity.class);
                intent1.putExtra("title","操作说明");
                intent1.putExtra("url", Constant.CBDBOPTION);
                startActivity(intent1);
            }
        });
        return view;
    }

}
